package com.rzgeo.rzmaplib.comp.geoview;

import com.esri.arcgisruntime.geometry.Envelope;
import com.esri.arcgisruntime.geometry.Point;
import com.esri.arcgisruntime.layers.ArcGISTiledLayer;
import com.esri.arcgisruntime.layers.FeatureLayer;
import com.esri.arcgisruntime.layers.Layer;
import com.esri.arcgisruntime.location.LocationDataSource;
import com.esri.arcgisruntime.mapping.GeoElement;
import com.esri.arcgisruntime.mapping.LayerList;
import com.esri.arcgisruntime.mapping.view.GeoView;
import com.esri.arcgisruntime.mapping.view.GraphicsOverlay;
import com.esri.arcgisruntime.util.ListenableList;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Queue;

/**
 * Created by zhanghang on 2018/1/20.
 */


public interface IRmlGeoViewHolder {
    public interface ILocMgr{
        public interface OnRecodeResult {
            void onFinish(Queue<Info> result);
        }

        void start(boolean withAttitude, int interval, int size, OnRecodeResult onRecodeResult);
        void stop();

        public class Info{
            public Date date;
            public LocationDataSource.Location location;

            public Info(Date date, LocationDataSource.Location location, float[] accelerometer) {
                this.date = date;
                this.location = location;
                this.accelerometer = accelerometer;
            }

            public float[]accelerometer;
        }
    }

    ILocMgr getLocMgr();

    public interface OnTouchListener{
        public void onTouch(Point mp, android.graphics.Point sp, List<GeoElement> elements);

        Layer wantLayer();

        double getTolerance();

        int getMaxReturn();
    }

    void onMapTouch(OnTouchListener onTouchListener);

    void addGraphicsOverlay(GraphicsOverlay gls);

    void setViewPoint(Point llPoint);

    void setViewExtent(Envelope ext);

    void setBaseMap(ArcGISTiledLayer tlayer, String absolutePath);

    void addDomLayer(ArrayList<Layer> domLayers);

    void addDemRasterLayer(ArrayList<Layer> demLayers);

    GeoView getGeoView();

    void addRefenceLayer(Layer l);

    void adddRefenceLayers(List<FeatureLayer> ls);

    void addOptionLayer(FeatureLayer l);

    void addOptionLayers(List<FeatureLayer> ls);

    LayerList getBaseLayers();

    LayerList getRefrenceLayers();

    LayerList getOperationalLayers();

    ListenableList<GraphicsOverlay> getGraphicsOverlays();

}
